package com.qili.service.exam.impl;

import com.qili.base.mapper.BaseMapper;
import com.qili.base.service.impl.BaseServiceImpl;
import com.qili.entity.exam.ExPaperQuestion;
import com.qili.mapper.exam.ExPaperQuestionMapper;
import com.qili.service.exam.ExPaperQuestionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author zhangshuo
 * @date 2021-05-08
 */
@Service
public class ExPaperQuestionServiceImpl extends BaseServiceImpl<ExPaperQuestion, String> implements ExPaperQuestionService {

    @Autowired
    ExPaperQuestionMapper exPaperQuestionMapper;

    @Override
    public BaseMapper<ExPaperQuestion, String> getMappser() {
        return exPaperQuestionMapper;
    }

    @Override
    public void deleteByPaperId(String id) {
        exPaperQuestionMapper.deleteByPaperId(id);
    }

    @Override
    public String selectPaperIdByPaperQuId(String id) {
        return exPaperQuestionMapper.selectPaperIdByPaperQuId(id);
    }

    @Override
    public List<String> selectPaperQuIdByPaperId(String paperId) {
        return exPaperQuestionMapper.selectPaperQuIdByPaperId(paperId);
    }

    @Override
    public void updateOrderNoByPaperQuId(String paperQuId, int i) {
        exPaperQuestionMapper.updateOrderNoByPaperQuId(paperQuId, i);
    }

    @Override
    public int selectNumByPaperId(String paperId) {
        return exPaperQuestionMapper.selectNumByPaperId(paperId);
    }
}
